<ul class="salary_list_head">
  <li>#</li>
  <li>姓名</li>
  <li>员工编号</li>
  <li>职务</li>
  <li>底薪</li>
  <li>提成</li>
  <li>补贴</li>
  <li>奖金</li>
  <li>保险金</li>
  <li>加班费</li>
  <li title="应扣费用为请假费用以及惩戒费用">应扣费用</li>
  <li>实发金额</li>
  <li>操作</li>
</ul>

<% if @store_staffs.present? %>
  <div class="list_wrap">
    <table class="salary_list  index_list">
      <tbody>
        <% @store_staffs.each.with_index(1) do |staff, index| %>
          <% @salary = staff.review_salary %>
          <tr data-id="<%= staff.id %>" class="js-salary-item-tr">
            <td class='sequence_num'><%= index %></td>
            <td><%= staff.full_name %></td>
            <td><%= staff.numero %></td>
            <td><%= staff.store_position_name %></td>
            <td><%= @salary.basic_salary %></td>
            <td><%= @salary.commission_amount %></td>
            <td><%= @salary.subsidy_amount %></td>
            <td><%= @salary.reward_amount %></td>
            <td>-<%= @salary.insurance_amount %></td>
            <td><%= @salary.overtime_amount %></td>
            <td>-<%= @salary.debit_total %></td>
            <td><%= @salary.actual_amount %></td>
            <td>
              <%= link_to '详情', ems_store_staff_salary_path(@salary.salary_id) %>&nbsp;
              <% if @salary.salary_status %>
                已审
              <% else %>
                <%= link_to '审核', '#', class: 'js-to-check-this-salary' %>
              <% end %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>

  <table class="salary_list">
    <tfoot>
      <tr>
        <td colspan="13" class="text-align-right">
          <span class="width-150">实发金额合计：</span> <span class="width-100 js-to-show-amount"> <%= @actual_payment_amount %></span>
        </td>
      </tr>
    </tfoot>
  </table>
<% else %>
  <h3>不存在该员工，请重新输入姓名查询</h3>
<% end %>
